/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pap.repositorios;

import com.myapp.struts.AgendaPersistente;
import com.myapp.struts.Agendap;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.*;


public class RepositorioAgendaJPA implements RepositorioJPA{

    @PersistenceContext
    private EntityManager em;
    private EntityManagerFactory factory;
    private String tableName;
    
    public RepositorioAgendaJPA(){
        this.tableName = "AGENDA";
        this.em = factory.createEntityManager();
    }
    
    public boolean insertInto(Object object) {
   
        List entities =  this.em.createNamedQuery("insertAgenda").getResultList();
        return true;
    }

    public boolean update(Object object) {
        return true;
    }

    public boolean deleteFrom(Object object) {
        return true;
    }

    public Object selectAll() {
        return new ArrayList();
    }

}
